FIG. 1 shows a block diagram of a conventional circuit 100 for driving a light source, e.g., a light emitting diode (LED) string 108. The circuit 100 is powered by a power source 102 which provides an input voltage VIN. The circuit 100 includes a buck converter for providing a regulated voltage VOUT to an LED string 108 under control of a controller 104. The buck converter includes a diode 114, an inductor 112, a capacitor 116, and a switch 106. A resistor 110 is coupled in series with the switch 106. When the switch 106 is turned on, the resistor 110 is coupled to the inductor 112 and the LED string 108, and can provide a feedback signal indicative of a current flowing through the inductor 112. When the switch 106 is turned off, the resistor 110 is disconnected from the inductor 112 and the LED string 108, and thus no current flows through the resistor 110.
The switch 106 is controlled by the controller 104. When the switch 106 is turned on, a current flows through the LED string 108, the inductor 112, the switch 106, and the resistor 110 to ground. The current increases due to the inductance of the inductor 112. When the current reaches a predetermined peak current level, the controller 104 turns off the switch 106. When the switch 106 is turned off, a current flows through the LED string 108, the inductor 112 and the diode 114. The controller 104 can turn on the switch 106 again after a time period. Thus, the controller 104 controls the buck converter based on the predetermined peak current level. However, the average level of the current flowing through the inductor 112 and the LED string 108 can vary with the inductance of the inductor 112, the input voltage VIN, and the voltage VOUT across the LED string 108. Therefore, the average level of the current flowing through the inductor 112 (the average current flowing through the LED string 108) may not be accurately controlled.